package valueObjects
{
	[Bindable]
	public class Product
	{
		public var catId:Number;		
		public var prodName:String;
		public var unitID:Number;
		public var cost:Number;
		public var listPrice:Number;
		public var description:String;
		public var isOrganic:Boolean;
		public var isLowFat:Boolean;
		public var imageName:String;						
		
		public function Product(_catId:Number, _prodName:String, _unitID:Number, _cost:Number, _listPrice:Number,
		_description:String, _isOrganic:Boolean, _isLowFat:Boolean, _imageName:String){
			catId = _catId;
			prodName = _prodName;
			unitID = _unitID;
			cost = _cost;
			listPrice = _listPrice;
			description = _description;
			isOrganic = _isOrganic;
			isLowFat = _isLowFat;
			imageName = _imageName;			
		}
		public function toString():String{
			return "[Product]" + this.prodName;
		}
		
		public static function buildProduct(o:Object):Product{
			return new Product(o.catID, o.prodName, o.unitID, o.cost, o.listPrice, o.description, 
								o.isOrganic, o.isLowFat, o.imageName);
		}
	}
}